package com.example.demo.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.example.demo.service.DcMainService;

@Controller

public class CompDcDeleteController {
	@Autowired
	private DcMainService dcMainService;
	@RequestMapping("/DeleteCompetition")
	public String deleteCompetition (@RequestParam("OrganizersName") String organizersName,
			@RequestParam("CompetitionName") String competitionName,
			@RequestParam("CompetitionType") String competitionType,
			@RequestParam("CompetitionDate") String competitionDate,
			@RequestParam("action") String action) {
		if(action.equals("确定")) 
		dcMainService.deleteCompetition(organizersName, competitionName, competitionType, competitionDate);
		return "CompDcMain.html";

	
}
}